package com.maiyuren.fishkit.ui.route

import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.runtime.Composable
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.rememberNavController
import com.maiyuren.fishkit.ui.pages.favourite.FavouritePage
import com.maiyuren.fishkit.ui.pages.main.HomePage

object RoutePath {
    const val HOME = "HOME"
    const val FAVOURITE = "FAVOURITE"
}

@RequiresApi(Build.VERSION_CODES.Q)
@Composable
fun NavigationRoute() {
    val navController = rememberNavController()
    NavHost(navController = navController, startDestination = RoutePath.HOME) {

        composable(RoutePath.HOME) {
            HomePage(navController)
        }

        composable(RoutePath.FAVOURITE) {
            FavouritePage(navController)
        }
    }
}